﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:System.Windows.Controls">

    <Style TargetType="controls:MenuItem">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="4,3,2,3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:MenuItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Presenter" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Bg" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" To="#40FFFFFF"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle
                            RadiusX="2"
                            RadiusY="2"
                            Fill="{TemplateBinding Background}"
                            Stroke="{TemplateBinding BorderBrush}"
                            StrokeThickness="1"/>
                        <Rectangle
                            x:Name="Bg"
                            RadiusX="2"
                            RadiusY="2"
                            Stroke="#8071CBF1"
                            StrokeThickness="1"
                            Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStop Color="#34C5EBFF" Offset="0"/>
                                        <GradientStop Color="#3481D8FF" Offset="1"/>
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle
                            x:Name="InnerBorder"
                            RadiusX="2"
                            RadiusY="2"
                            Stroke="Transparent"
                            Margin="1"/>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="Auto"
                                    MinWidth="24"/>
                                <ColumnDefinition Width="4"/>
                                <ColumnDefinition Width="*"/>
                                <!--<ColumnDefinition Width="37"/>
                                <ColumnDefinition Width="Auto"/>-->
                                <ColumnDefinition Width="17"/>
                            </Grid.ColumnDefinitions>
                            <ContentPresenter
                                Content="{TemplateBinding Icon}"
                                Margin="1"
                                VerticalAlignment="Center"/>
                            <!--<Border
                                BorderThickness="1"
                                CornerRadius="3"
                                BorderBrush="#FFCDD3E6"
                                Background="#FFE6EFF4"
                                x:Name="GlyphPanel"
                                Width="22"
                                Height="22"
                                Margin="1"
                                Visibility="Collapsed">
                                <Path
                                    Data="M0,5.1L1.7,5.2 3.4,7.1 8,0.4 9.2,0 3.3,10.8z"
                                    Fill="#FF0C12A1"
                                    x:Name="Glyph"
                                    Width="9"
                                    Height="11"
                                    FlowDirection="LeftToRight"/>
                            </Border>-->
                            <ContentPresenter
                                x:Name="Presenter"
                                Content="{TemplateBinding Header}"
                                ContentTemplate="{TemplateBinding HeaderTemplate}"
                                Margin="{TemplateBinding Padding}"
                                Grid.Column="2"/>
                            <!--<TextBlock
                                Text="{TemplateBinding InputGestureText}"
                                Margin="{TemplateBinding Padding}"
                                Grid.Column="4"/>-->
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
